package BusinessLogic;

import java.text.ParseException;
import java.util.ArrayList;

import Data.GiftRecordData;
import Data.GiftRecordDataOperator;
import Data.MemberData;

public class GiftController implements IGiftController{
	
	private GiftModel gd = new GiftModel();
	private GiftRecordDataOperator gro = new GiftRecordDataOperator();
	
	public GiftModel getIGiftModel(){
		return gd;
	}
	
	public void setIGiftModel(GiftModel Gd){
		gd = Gd;
	}
	
	public GiftController(){
		gd = new GiftModel();
	}
	
	public ArrayList<GiftRecordData> getGiftRecordData(){
		return gd.getGiftRecordData();
	}
	
	public boolean saveDataControl(int ID,String name,int goodid,String goodname,double number,String data,double mintegralsum,int isbirthday){
		return gd.saveData(ID, name, goodid, goodname, number, data, mintegralsum, isbirthday);
	}
	
	public MemberData readDataByIDControl(int id){
		return gd.readDataByID(id);
	}
	
	public boolean birthdayControl(int MemberID) throws ParseException{
		return gd.birthday(MemberID);
	}
	
	public String getbirthdayControl(int MemberID){
		return gd.getbirthday(MemberID);
	}
	
	public double getMintegralSumControl(int MemberID){
		return gd.getMintegralSum(MemberID);
	}
	
	public String getMemberNameByIDControl(int ID){
		return gd.getMemberNameByID(ID);
	}
	
	public String getMemberBirthdayByIDControl(int ID){
		return gd.getMemberBirthdayByID(ID);
	}
	
	public String getMemberSexByIDControl(int ID){
		return gd.getMemberSexByID(ID);
	}
	
	public String getMemberContactWayByIDControl(int ID){
		return gd.getMemberContactWayByID(ID);
	}
	
	public double getMemberIntegralSumByIDControl(int ID){
		return gd.getMemberIntegralSumByID(ID);
	}
	
	public double getMemberIntegralBalanceByIDControl(int ID){
		return gd.getMemberIntegralBalanceByID(ID);
	}
	
	public boolean sendGoodByIDControl(int ID,double number){
		return gd.sendGoodByID(ID, number);
	}



}
